import admin from './modules/admin';

const adminModules={
        admin,
    }
    const root= {
        state: {
            api: null,
            tools: null,
            setting: {},
            locale:'zh_CN'
        },
        mutations: {
            initial(state, {tools, setting}) {
                state.tools = tools;
                state.setting = setting;
                state.locale=setting.i18n.default;
                window.locale = state.locale;
            },
            setApi(state,api){
                state.api = api;
            },
            setLocale(state,locale){
                state.locale=locale;
                window.locale = state.locale;
            }
        }
    }
export {root,adminModules};
